public class Test {
    private int count (){
        int count = 0;
        for (int i = 0; i <10 ; i++) {
            count+=i;
        }
        return count;
    }
    private int sum(){
        return count();
    }
    public static void main(String[] args) {
        LinkedList link = new LinkedList();
        link.addFirst(10);
        link.addFirst(20);
        link.addFirst(30);
        link.addFirst(40);
        link.display();
        link.addIndex(-1,10);
    }
}
























